package com.demo.spi;

import com.demo.spi.service.OrderService;

import java.util.ServiceLoader;

/**
 * @author: lipan
 * @date: 2021/12/13 21:12
 */

public class Main {

    public static void main(String[] args) {

        ServiceLoader<OrderService> services = ServiceLoader.load(OrderService.class);
        for (OrderService service : services) {
            service.getOrderInfo();
        }

    }
}
